﻿///////////////////////////////////////////////////////////////
// This is generated code. 
//////////////////////////////////////////////////////////////
// Code is generated using LLBLGen Pro version: 2.6
// Code is generated on: Tuesday, June 23, 2009 8:50:01 PM
// Code is generated using templates: SD.TemplateBindings.SharedTemplates.NET20
// Templates vendor: Solutions Design.
// Templates version: 
//////////////////////////////////////////////////////////////
using System;
using SD.LLBLGen.Pro.ORMSupportClasses;

namespace OrmSmackdown.LLBLGen.HelperClasses
{
	
	// __LLBLGENPRO_USER_CODE_REGION_START AdditionalNamespaces
	// __LLBLGENPRO_USER_CODE_REGION_END
	
	
	/// <summary>
	/// Singleton implementation of the FieldInfoProvider. This class is the singleton wrapper through which the actual instance is retrieved.
	/// </summary>
	/// <remarks>It uses a single instance of an internal class. The access isn't marked with locks as the FieldInfoProviderBase class is threadsafe.</remarks>
	internal sealed class FieldInfoProviderSingleton
	{
		#region Class Member Declarations
		private static readonly IFieldInfoProvider _providerInstance = new FieldInfoProviderCore();
		#endregion
		
		/// <summary>private ctor to prevent instances of this class.</summary>
		private FieldInfoProviderSingleton()
		{
		}

		/// <summary>Dummy static constructor to make sure threadsafe initialization is performed.</summary>
		static FieldInfoProviderSingleton()
		{
		}

		/// <summary>Gets the singleton instance of the FieldInfoProviderCore</summary>
		/// <returns>Instance of the FieldInfoProvider.</returns>
		public static IFieldInfoProvider GetInstance()
		{
			return _providerInstance;
		}
	}

	/// <summary>Actual implementation of the FieldInfoProvider. Used by singleton wrapper.</summary>
	internal class FieldInfoProviderCore : FieldInfoProviderBase
	{
		/// <summary>Initializes a new instance of the <see cref="FieldInfoProviderCore"/> class.</summary>
		internal FieldInfoProviderCore()
		{
			Init();
		}

		/// <summary>Method which initializes the internal datastores.</summary>
		private void Init()
		{
			base.InitClass( (8 + 0));
			InitAddressesEntityInfos();
			InitCompaniesEntityInfos();
			InitContactEntityInfos();
			InitPeopleEntityInfos();
			InitPortalPeopleXrefEntityInfos();
			InitPortalsEntityInfos();
			InitRolesEntityInfos();
			InitUserEntityInfos();

			base.ConstructElementFieldStructures(InheritanceInfoProviderSingleton.GetInstance());
		}

		/// <summary>Inits AddressesEntity's FieldInfo objects</summary>
		private void InitAddressesEntityInfos()
		{
			base.AddElementFieldInfo("AddressesEntity", "AddressId", typeof(System.Int32), true, false, true, false,  (int)AddressesFieldIndex.AddressId, 0, 0, 10);
			base.AddElementFieldInfo("AddressesEntity", "PersonId", typeof(System.Int32), false, true, false, false,  (int)AddressesFieldIndex.PersonId, 0, 0, 10);
			base.AddElementFieldInfo("AddressesEntity", "IsDefault", typeof(System.Boolean), false, false, false, false,  (int)AddressesFieldIndex.IsDefault, 0, 0, 0);
			base.AddElementFieldInfo("AddressesEntity", "Line1", typeof(System.String), false, false, false, false,  (int)AddressesFieldIndex.Line1, 128, 0, 0);
			base.AddElementFieldInfo("AddressesEntity", "Line2", typeof(System.String), false, false, false, true,  (int)AddressesFieldIndex.Line2, 128, 0, 0);
			base.AddElementFieldInfo("AddressesEntity", "City", typeof(System.String), false, false, false, false,  (int)AddressesFieldIndex.City, 128, 0, 0);
			base.AddElementFieldInfo("AddressesEntity", "State", typeof(System.String), false, false, false, false,  (int)AddressesFieldIndex.State, 2, 0, 0);
			base.AddElementFieldInfo("AddressesEntity", "ZipCode", typeof(System.String), false, false, false, false,  (int)AddressesFieldIndex.ZipCode, 5, 0, 0);
			base.AddElementFieldInfo("AddressesEntity", "ZipCodePlusFour", typeof(System.String), false, false, false, false,  (int)AddressesFieldIndex.ZipCodePlusFour, 4, 0, 0);
		}
		/// <summary>Inits CompaniesEntity's FieldInfo objects</summary>
		private void InitCompaniesEntityInfos()
		{
			base.AddElementFieldInfo("CompaniesEntity", "CompanyId", typeof(System.Int32), true, false, true, false,  (int)CompaniesFieldIndex.CompanyId, 0, 0, 10);
			base.AddElementFieldInfo("CompaniesEntity", "CompanyName", typeof(System.String), false, false, false, false,  (int)CompaniesFieldIndex.CompanyName, 50, 0, 0);
		}
		/// <summary>Inits ContactEntity's FieldInfo objects</summary>
		private void InitContactEntityInfos()
		{

		}
		/// <summary>Inits PeopleEntity's FieldInfo objects</summary>
		private void InitPeopleEntityInfos()
		{
			base.AddElementFieldInfo("PeopleEntity", "PersonId", typeof(System.Int32), true, false, true, false,  (int)PeopleFieldIndex.PersonId, 0, 0, 10);
			base.AddElementFieldInfo("PeopleEntity", "FirstName", typeof(System.String), false, false, false, false,  (int)PeopleFieldIndex.FirstName, 50, 0, 0);
			base.AddElementFieldInfo("PeopleEntity", "LastName", typeof(System.String), false, false, false, false,  (int)PeopleFieldIndex.LastName, 50, 0, 0);
			base.AddElementFieldInfo("PeopleEntity", "Email", typeof(System.String), false, false, false, false,  (int)PeopleFieldIndex.Email, 128, 0, 0);
			base.AddElementFieldInfo("PeopleEntity", "CompanyId", typeof(Nullable<System.Int32>), false, true, false, true,  (int)PeopleFieldIndex.CompanyId, 0, 0, 10);
			base.AddElementFieldInfo("PeopleEntity", "RoleId", typeof(System.Int32), false, true, false, false,  (int)PeopleFieldIndex.RoleId, 0, 0, 10);
			base.AddElementFieldInfo("PeopleEntity", "ManagerPersonId", typeof(Nullable<System.Int32>), false, true, false, true,  (int)PeopleFieldIndex.ManagerPersonId, 0, 0, 10);
			base.AddElementFieldInfo("PeopleEntity", "UserType", typeof(System.String), false, false, true, false,  (int)PeopleFieldIndex.UserType, 2, 0, 0);
		}
		/// <summary>Inits PortalPeopleXrefEntity's FieldInfo objects</summary>
		private void InitPortalPeopleXrefEntityInfos()
		{
			base.AddElementFieldInfo("PortalPeopleXrefEntity", "PortalId", typeof(System.Int32), true, true, false, false,  (int)PortalPeopleXrefFieldIndex.PortalId, 0, 0, 10);
			base.AddElementFieldInfo("PortalPeopleXrefEntity", "PersonId", typeof(System.Int32), true, true, false, false,  (int)PortalPeopleXrefFieldIndex.PersonId, 0, 0, 10);
		}
		/// <summary>Inits PortalsEntity's FieldInfo objects</summary>
		private void InitPortalsEntityInfos()
		{
			base.AddElementFieldInfo("PortalsEntity", "PortalId", typeof(System.Int32), true, false, true, false,  (int)PortalsFieldIndex.PortalId, 0, 0, 10);
			base.AddElementFieldInfo("PortalsEntity", "PortalName", typeof(System.String), false, false, false, false,  (int)PortalsFieldIndex.PortalName, 50, 0, 0);
			base.AddElementFieldInfo("PortalsEntity", "AdminUserId", typeof(System.Int32), false, true, false, false,  (int)PortalsFieldIndex.AdminUserId, 0, 0, 10);
		}
		/// <summary>Inits RolesEntity's FieldInfo objects</summary>
		private void InitRolesEntityInfos()
		{
			base.AddElementFieldInfo("RolesEntity", "RoleId", typeof(System.Int32), true, false, true, false,  (int)RolesFieldIndex.RoleId, 0, 0, 10);
			base.AddElementFieldInfo("RolesEntity", "RoleName", typeof(System.String), false, false, false, false,  (int)RolesFieldIndex.RoleName, 50, 0, 0);
			base.AddElementFieldInfo("RolesEntity", "IsForPortal", typeof(System.Boolean), false, false, false, false,  (int)RolesFieldIndex.IsForPortal, 0, 0, 0);
			base.AddElementFieldInfo("RolesEntity", "IsForContact", typeof(System.Boolean), false, false, false, false,  (int)RolesFieldIndex.IsForContact, 0, 0, 0);
		}
		/// <summary>Inits UserEntity's FieldInfo objects</summary>
		private void InitUserEntityInfos()
		{

		}
		
	}
}




